[qemu] HVM acpi port init update.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 9 Aug 2006 19:07:01 +0000 (20:07 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 9 Aug 2006 19:07:01 +0000 (20:07 +0100)
Removed the acpi port depency on USB exist.

Based on a patch from: Winston Wang <winston.l.wang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/ioemu/hw/pc.c
tools/ioemu/hw/piix4acpi.c

index 7dd1f75203ebb71e5b51a143a2e49e398f4ee36f..70cf09064fb890c2f063fc5a3bc9208dd25f241d 100644 (file)
@@ -877,14 +877,14 @@ static void pc_init1(uint64_t ram_size, int vga_ram_size, int boot_device,
 
     cmos_init(ram_size, boot_device, bs_table, timeoffset);
 
-    /* using PIIX4 acpi model */
-    if (pci_enabled && acpi_enabled)
-        pci_piix4_acpi_init(pci_bus, piix3_devfn + 3);
-
     if (pci_enabled && usb_enabled) {
         usb_uhci_init(pci_bus, piix3_devfn + 2);
     }
 
+    /* using PIIX4 acpi model */
+    if (pci_enabled && acpi_enabled)
+        pci_piix4_acpi_init(pci_bus, piix3_devfn + (usb_enabled ? 3 : 2));
+
 #ifndef CONFIG_DM
     if (pci_enabled && acpi_enabled) {
         piix4_pm_init(pci_bus, piix3_devfn + 3);
index 2f4bdf61d53cea5bdf3e79a2b955f95c34f6b6be..1426447f9b63c7d0a3815486eeb7bf04639a51a1 100644 (file)
@@ -380,7 +380,7 @@ void pci_piix4_acpi_init(PCIBus *bus, int devfn)
     PCIAcpiState *d;
     uint8_t *pci_conf;
 
-    /* register a function 3 of PIIX4 */
+    /* register a function devfn of PIIX4 */
     d = (PCIAcpiState *)pci_register_device(
         bus, "PIIX4 ACPI", sizeof(PCIAcpiState),
         devfn, NULL, NULL);